#include "cSound.h"

cSound::cSound(char* fileName, FMOD::System *system)
{
	//If the file name is valueless quit the initialization
	if(fileName == 0)
		return;

	//If the system is valueless quit the initialization
	if(system == 0)
		return;

	//Otherwise continue with the initialization
	system->createSound(fileName, FMOD_DEFAULT, 0, &m_pSound);
}

cSound::~cSound()
{
	//Release the information inside of the
	//sound file when the asset is deleted
	if(m_pSound != 0)
	{
		m_pSound->release();
		m_pSound = 0;
	}
}

FMOD::Sound cSound::retreiveSound()
{
	return *m_pSound;
}